import { Component } from '@angular/core';
import { AdminService } from './admin.service';
import {  }
@Component({
    moduleId: module.id,
    selector: 'admin',
    templateUrl: './views/admin.html',
    styleUrls: [ './views/admin.css' ]
})
export class AdminComponent {
    constructor( private AdminService:AdminService ){
        this.username;
        this.password;
     }
    login(){
        let user = {
            username:this.username,
            password:this.password
        }
        this.AdminService.login(user).then(
            (res) => {
                this.res = res.data;
                if(this.res.status == 200){
                    alert('213');
                } else {
                    alert('error')
                };
            }
        )
    }
}